package com.kuang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ModelTest1 {
    @RequestMapping
    public String test1(Model model){
        //转发
        model.addAttribute("msg","ModelTest1");
        //return "forward:/WEB-INF/jsp/test.jsp";
        return "redirect:/index.jsp";
        //上面这个是重定向
    }
}
